-- GENERATED SPELL FOR [Coilfang Tempest] --


function spell0_21127(pUnit, Event) --@Deadly Poison,n/a--
pUnit:FullCastSpellOnTarget(36872,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21127', 15000, 1)
end

function spell1_21127(pUnit, Event) --@Sinister Strike,n/a--
pUnit:FullCastSpellOnTarget(15667,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21127', 648, 1)
end

function Sorts_21127(pUnit, Event)
local choix_sorts_21127 = math.random(0, 1)
if choix_sorts_21127 == 0 then
pUnit:RegisterEvent('spell0_21127', 1, 1)
end
if choix_sorts_21127 == 1 then
pUnit:RegisterEvent('spell1_21127', 1, 1)
end
end

function mob21127_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21127', math.random(1500, 3000), 1)
end

function mob21127_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21127_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21127_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21127, 1, 'mob21127_Action')
RegisterUnitEvent(21127, 2, 'mob21127_Leave')
RegisterUnitEvent(21127, 3, 'mob21127_Kill')
RegisterUnitEvent(21127, 4, 'mob21127_Die')
